//空类中的默认重要类 
#include "BMP.h"

//构造函数
BMP::BMP(string fileName)
{
    //并获取图片的尺寸、RGB的数据
    //具体代码略过

    //width = ...
    //height = ...
    //RGB = ...

    this->fileName = fileName;


    RGB = new char[10*1024];    //需要返还内存，不然会造成内存泄漏
}

//析构函数
BMP::~BMP()
{
    delete [] RGB;
}

//本来就有，不用写
BMP &BMP :: operator=(const BMP &r)
{
    fileName = r.fileName;
    width = r.width;
    height = r.height;
    RGB = r.RGB;
    return *this;
}